package tech.aistar.mapper.news;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tech.aistar.vo.NewsVo;

import java.util.List;

/**
 * Created by Administrator on 2019/10/15 0015.
 */
@Repository
public interface NewsVoMapper {
    @Select("select n.* ,u.name from news n join user_info u on n.userinfo_id = u.id")
    List<NewsVo> newsvoFindAll();


    @Select("select n.* ,u.name from news  n join user_info u on n.serid = u.id  where userinfo_id=#{value}")
    List<NewsVo> newvoFindOne(Integer userinfoId);
}
